package com.ricky.db.model;

import com.ricky.game.Hero;

/**
 * 英雄配置数据
 * @author rik
 *
 */
public class HeroData extends Model {

	private String userName;
	
	private int sceneID;
	
	private int x;
	private int y;
	
	private String name;
	
	private String unitID;

	/**
	 * @return the userName
	 */
	public String getUserName() {
		return userName;
	}

	/**
	 * @param userName the userName to set
	 */
	public void setUserName(String userName) {
		this.userName = userName;
	}

	/**
	 * @return the sceneID
	 */
	public int getSceneID() {
		return sceneID;
	}

	/**
	 * @param sceneID the sceneID to set
	 */
	public void setSceneID(int sceneID) {
		this.sceneID = sceneID;
	}

	/**
	 * @return the x
	 */
	public int getX() {
		return x;
	}

	/**
	 * @param x the x to set
	 */
	public void setX(int x) {
		this.x = x;
	}

	/**
	 * @return the y
	 */
	public int getY() {
		return y;
	}

	/**
	 * @param y the y to set
	 */
	public void setY(int y) {
		this.y = y;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String heroName) {
		this.name = heroName;
	}

	/**
	 * @return the unitID
	 */
	public String getUnitID() {
		return unitID;
	}

	/**
	 * @param unitID the unitID to set
	 */
	public void setUnitID(String unitID) {
		this.unitID = unitID;
	}
	
	public static void copyTo(HeroData hd,Hero hero)
	{
		hero.setSceneID(hd.getSceneID());
		hero.setName(hd.getName());
		hero.setUserName(hd.getUserName());
		hero.setSceneID(hd.getSceneID());
//		hero.setX(hd.getX());
//		hero.setY(hd.getY());
		hero.setUnit(hd.getUnitID());
	}
	
	public static void copyTo(Hero hero,HeroData hd)
	{
		hd.setSceneID(hero.getSceneID());
		hd.setName(hero.getName());
		hd.setUserName(hero.getUserName());
		hd.setSceneID(hero.getSceneID());
//		hd.setX(hero.getX());
//		hd.setY(hero.getY());
		hd.setUnitID(hero.getUnit().getUnitID());
	}
}
